CC = gcc
CFLAGS = -g -c -Wall

APP_NAME = tp2

tp2: entradaSaida.o  controleEleicao.o main.o
	$(CC) -lpthread entradaSaida.o controleEleicao.o main.o -o tp2
	
entradaSaida.o: entradaSaida.h entradaSaida.c
	$(CC) $(CFLAGS) entradaSaida.c -o entradaSaida.o
	
controleEleicao.o: controleEleicao.h controleEleicao.c
	$(CC) $(CFLAGS) controleEleicao.c -o controleEleicao.o
	
main.o: main.c
	$(CC) $(CFLAGS) main.c -o main.o
	

run: tp2
	./tp2 "teste.txt" 2 2

clean:
	\rm -rf *.o *.e *.c~ *.h~ *.txt~ makefile~ tp2

Arquivo: makefile
